package com.cms.service.Impl;

import com.cms.entity.auction_user;
import com.cms.mapper.auction_userMapper;
import com.cms.service.auction_userService;

public  class auction_userServiceImpl implements auction_userService {
    private auction_userMapper mapper;
    private com.cms.entity.auction_user auction_user;

    @Override
    public void register(auction_userService manager) {
        mapper.insert(auction_user);
    }

    @Override
    public Boolean showLogin(String username, String password) {
        auction_userMapper manager = mapper.selectByUsernameId(username);
        if(manager==null){
            System.out.println("账号不存在。。。");
            return false;
        }else {
            if (manager.getPassword().equals(password)){
                System.out.println("登陆成功。。。");
                return true;
            }else{
                System.out.println("密码错误。。。");
                return false;
            }
        }
    }

    @Override
    public void updatePassword(String username, String password) {
        mapper.updatePassword(username,password);

    }

    @Override
    public void updateUsername(String username, String password) {

    }

    @Override
    public void updateEmail(String username, String password) {

    }

    @Override
    public void updatePhone(String username, String password) {

    }

    @Override
    public void updateAddress(String username, String password) {

    }

    @Override
    public void insertUser(com.cms.entity.auction_user user) {

    }


    public void login(String mail, String number) {
    }
}
